<?php

if(!defined('_SETTINGS_HTML_')) {
define('_SETTINGS_HTML_', 1);

function flep_settings_menu(){

  $settings_pages = array(
    'horario'
      => 'Horarios',
    'idioma'
      => "Idiomas",
    'categoria'
      => "Categorias",
    'usuario'
      => "Usuarios"
  );

  flep_html_menu_float($settings_pages, 'settings', 'Administraci&oacute;n');
}

function flep_settings_html_table_data(&$data) {
  if(flep_search_all($data)){
    flep_html_table_list_navigation($data);
    ?>
    <tr>
    <td colspan="2">
    <table class="list">
    <?php
    flep_html_table_list_headers($data['table_headers']);
    echo '<tbody>';
    foreach($data['data'] as $i => &$item){
      echo '<tr><td>'.($i+1).'</td>';
      foreach($data['table_indexes'] as $idx) {
        echo '<td>'.$item[$idx].'</td>';
      }
      $enc_id = flep_encode($item['id']);
      foreach($data['table_actions'] as $action) {
        printf('<td class="list_center">'.$action.'</td>', $enc_id);
      }
    echo '</tr>';
    }
  } else {
    echo '<table><tr><td>'.$data['table_error'].'</td></tr>';
  }
  echo '</tbody></table></td></tr>';
}

}
?>
